<?php

require_once ROOT_PATH . '/lib/models/surveys/Questions.php';
require_once ROOT_PATH . '/lib/models/surveys/Options.php';

class EXTRACTOR_Options {

	public function parseAddData($postArr) {
		//print_r($postArr);
		//die("here");
		$option = New Options();
		$option->setQuestionId($postArr['questionId']);						
		$option->setText($postArr['txtOption']);
		if(isset($postArr['txtValue'])){
			$option->setValue($postArr['txtValue']?$postArr['txtValue']:0);	
		}
		
		return $option;
	}
}
?>